export function formatTag(str: string) {
  return str.split(',')
}
export function formatJSON(str: string) {
  return [
    {
      points: JSON.parse(str),
      width: 2,
    },
  ]
}

interface ItemType {
  latitude: number
  longitude: number
}
export function formatMap(str: string) {
  let resultMap: any[] = []
  const list = JSON.parse(str)
  resultMap = list.map((item: ItemType, index: number) => {
    return {
      ...item,
      id: index,
      iconPath: '/static/images/marker.png',
    }
  })
  return resultMap
}
